<?php /* Smarty version 2.6.14, created on 2012-10-21 04:28:32
         compiled from admin_mass_message_tool.tpl */
?><?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'count', 'admin_mass_message_tool.tpl', 93, false),array('modifier', 'truncate', 'admin_mass_message_tool.tpl', 116, false),array('modifier', 'nl2br', 'admin_mass_message_tool.tpl', 165, false),)), $this);
?><?php
SELanguage::_preload_multi(690690001,690690002,690690003,690690004,690690005,690690030,690690006,690690007,690690008,690690009,690690012,690690013,690690016,690690014,690690015,690690018,690690019,690690021,690690022,690690020,690690017,690690025,690690026,690690027,690690028,690690024);
SELanguage::load();
?><?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin_header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<link rel="stylesheet" href="../templates/he_admin_styles.css" title="stylesheet" type="text/css" />
<?php if ($this->_tpl_vars['se_version'] < 313): ?>
<script type="text/javascript" src="../include/js/autosuggest.js"></script>
<?php endif; 
 echo '
<script type="text/javascript">
	window.addEvent(\'domready\', function(){
		var options = {
			script:"admin_mass_message_tool.php?task=get_users&",
			varname:"username",
			json:true,
			shownoresults:false,
			multisuggest:false,
			timeout:5000
		};
		
		new bsn.AutoSuggest(\'setting_mass_message_from_user\', options);
	});
</script>
'; ?>



<h2><?php echo SELanguage::_get(690690001); ?></h2>
<?php echo SELanguage::_get(690690002); ?> Please go to <a href="http://www.hire-experts.com/">Hire-Experts.com</a> to get this plugin latest version.<br />
<br />

<?php if ($this->_tpl_vars['message']): ?>
	<?php if ($this->_tpl_vars['message']['info']): ?>
	  <div class='he_success'><img src='../images/success.gif' border='0' class='icon'> <?php echo $this->_tpl_vars['message']['info']; ?>
</div>
  <?php endif; ?>
  <?php if ($this->_tpl_vars['message']['error']): ?>
	  <div class='he_error'><img src='../images/error.gif' border='0' class='icon'> <?php echo $this->_tpl_vars['message']['error']; ?>
</div>
	<?php endif; 
 endif; ?>

<br />

<div class="he_tabs">
	<a href="admin_mass_message_tool.php?tab=settings" class="<?php if ($this->_tpl_vars['tab'] == 'settings'): ?>active<?php else: ?>inactive<?php endif; ?>"><?php echo SELanguage::_get(690690003); ?></a>
	<a href="admin_mass_message_tool.php?tab=mass_message" class="<?php if ($this->_tpl_vars['tab'] == 'mass_message'): ?>active<?php else: ?>inactive<?php endif; ?>"><?php echo SELanguage::_get(690690004); ?></a>
	<a href="admin_mass_message_tool.php?tab=mass_email" class="<?php if ($this->_tpl_vars['tab'] == 'mass_email'): ?>active<?php else: ?>inactive<?php endif; ?>"><?php echo SELanguage::_get(690690005); ?></a>
</div>
<div class="he_body">

<?php if ($this->_tpl_vars['tab'] == 'settings'): ?>
	<div class="he_tab_desc"><?php echo SELanguage::_get(690690030); ?></div>
	<form action="admin_mass_message_tool.php" method="POST">
		<input type="hidden" name="tab" value="<?php echo $this->_tpl_vars['tab']; ?>
" />
		<input type="hidden" name="task" value="save_settings" />
		<table class="he_tbl" width="460">
			<tbody>
				<tr class="bg1">
					<td><?php echo SELanguage::_get(690690006); ?></td>
					<td><input type="text" class="text" name="setting_mass_message_from_user" id="setting_mass_message_from_user" value="<?php echo $this->_tpl_vars['setting']['setting_mass_message_from_user']; ?>
" /></td>
				</tr>
				<tr class="bg1">
					<td><?php echo SELanguage::_get(690690007); ?></td>
					<td><input type="text" class="text" name="setting_mass_message_per_minute" value="<?php echo $this->_tpl_vars['setting']['setting_mass_message_per_minute']; ?>
" /></td>
				</tr>
				<tr class="bg1">
					<td><?php echo SELanguage::_get(690690008); ?></td>
					<td><input type="text" class="text" name="setting_mass_email_per_minute" value="<?php echo $this->_tpl_vars['setting']['setting_mass_email_per_minute']; ?>
" /></td>
				</tr>
			</tbody>
		</table><br />
		<div style="width:460px;" class="he_submit">
			<input type="submit" value="<?php echo SELanguage::_get(690690009); ?>" class="button" />
		</div>
	</form>
	
<?php elseif ($this->_tpl_vars['tab'] == 'mass_message'): ?>

	<form action='admin_mass_message_tool.php' method="POST">
		<input type="hidden" name="tab" value="<?php echo $this->_tpl_vars['tab']; ?>
" />
		<input type="hidden" name="task" value="mass_message" />
		
		<div class="he_item">
			<div class="he_label"><?php echo SELanguage::_get(690690012); ?></div>
			<input type='text' name='subject' size='50' class='text' maxlength='200' />
		</div>
		
		<div class="he_item">
			<div class="he_label"><?php echo SELanguage::_get(690690013); ?></div>
			<textarea name='message' class='text' rows='12' cols='100'></textarea><br />
			<?php echo SELanguage::_get(690690016); ?>
		</div>
		
				<?php if (count($this->_tpl_vars['levels']) > 10 || count($this->_tpl_vars['subnets']) + 1 > 10): ?>
		  <?php $this->assign('options_to_show', '10'); ?>
		<?php elseif (count($this->_tpl_vars['levels']) > count($this->_tpl_vars['subnets']) + 1): ?>
		  <?php $this->assign('options_to_show', count($this->_tpl_vars['levels'])); ?>
		<?php elseif (count($this->_tpl_vars['levels']) < count($this->_tpl_vars['subnets']) + 1): ?>
		  <?php $this->assign('options_to_show', ($this->_tpl_vars['subnets'])."|@count+1"); ?>
		<?php elseif (count($this->_tpl_vars['levels']) == count($this->_tpl_vars['subnets']) + 1): ?>
		  <?php $this->assign('options_to_show', count($this->_tpl_vars['levels'])); ?>
		<?php endif; ?>

		<div class="he_item">
			<div class="he_label"><?php echo SELanguage::_get(690690014); ?></div>
			<?php echo SELanguage::_get(690690015); ?><br /><br />
			
			<table cellpadding='0' cellspacing='0'>
				<tr>
					<td><b><?php echo SELanguage::_get(690690018); ?></b></td>
					<td style='padding-left: 10px;'><b><?php echo SELanguage::_get(690690019); ?></b></td>
				</tr>
				<tr>
					<td>
						<select size='<?php echo $this->_tpl_vars['options_to_show']; ?>
' class='text' name='levels[]' id='levels' multiple='multiple' style='width: 270px;'>
						<?php unset($this->_sections['level_loop']);
$this->_sections['level_loop']['name'] = 'level_loop';
$this->_sections['level_loop']['loop'] = is_array($_loop=$this->_tpl_vars['levels']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['level_loop']['show'] = true;
$this->_sections['level_loop']['max'] = $this->_sections['level_loop']['loop'];
$this->_sections['level_loop']['step'] = 1;
$this->_sections['level_loop']['start'] = $this->_sections['level_loop']['step'] > 0 ? 0 : $this->_sections['level_loop']['loop']-1;
if ($this->_sections['level_loop']['show']) {
    $this->_sections['level_loop']['total'] = $this->_sections['level_loop']['loop'];
    if ($this->_sections['level_loop']['total'] == 0)
        $this->_sections['level_loop']['show'] = false;
} else
    $this->_sections['level_loop']['total'] = 0;
if ($this->_sections['level_loop']['show']):

            for ($this->_sections['level_loop']['index'] = $this->_sections['level_loop']['start'], $this->_sections['level_loop']['iteration'] = 1;
                 $this->_sections['level_loop']['iteration'] <= $this->_sections['level_loop']['total'];
                 $this->_sections['level_loop']['index'] += $this->_sections['level_loop']['step'], $this->_sections['level_loop']['iteration']++):
$this->_sections['level_loop']['rownum'] = $this->_sections['level_loop']['iteration'];
$this->_sections['level_loop']['index_prev'] = $this->_sections['level_loop']['index'] - $this->_sections['level_loop']['step'];
$this->_sections['level_loop']['index_next'] = $this->_sections['level_loop']['index'] + $this->_sections['level_loop']['step'];
$this->_sections['level_loop']['first']      = ($this->_sections['level_loop']['iteration'] == 1);
$this->_sections['level_loop']['last']       = ($this->_sections['level_loop']['iteration'] == $this->_sections['level_loop']['total']);
?>
						<option value='<?php echo $this->_tpl_vars['levels'][$this->_sections['level_loop']['index']]['level_id']; ?>
' selected='selected'><?php echo ((is_array($_tmp=$this->_tpl_vars['levels'][$this->_sections['level_loop']['index']]['level_name'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 75, "...", true) : smarty_modifier_truncate($_tmp, 75, "...", true)); 
 if ($this->_tpl_vars['levels'][$this->_sections['level_loop']['index']]['level_default'] == 1): ?> <?php echo SELanguage::_get(690690021); 
 endif; ?></option>
						<?php endfor; endif; ?>
						</select>
					</td>
					<td style='padding-left: 10px;'>
						<select size='<?php echo $this->_tpl_vars['options_to_show']; ?>
' class='text' name='subnets[]' id='subnets' multiple='multiple' style='width: 270px;'>
						<option value='0' selected='selected'><?php echo SELanguage::_get(690690022); ?></option>
						<?php unset($this->_sections['subnet_loop']);
$this->_sections['subnet_loop']['name'] = 'subnet_loop';
$this->_sections['subnet_loop']['loop'] = is_array($_loop=$this->_tpl_vars['subnets']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['subnet_loop']['show'] = true;
$this->_sections['subnet_loop']['max'] = $this->_sections['subnet_loop']['loop'];
$this->_sections['subnet_loop']['step'] = 1;
$this->_sections['subnet_loop']['start'] = $this->_sections['subnet_loop']['step'] > 0 ? 0 : $this->_sections['subnet_loop']['loop']-1;
if ($this->_sections['subnet_loop']['show']) {
    $this->_sections['subnet_loop']['total'] = $this->_sections['subnet_loop']['loop'];
    if ($this->_sections['subnet_loop']['total'] == 0)
        $this->_sections['subnet_loop']['show'] = false;
} else
    $this->_sections['subnet_loop']['total'] = 0;
if ($this->_sections['subnet_loop']['show']):

            for ($this->_sections['subnet_loop']['index'] = $this->_sections['subnet_loop']['start'], $this->_sections['subnet_loop']['iteration'] = 1;
                 $this->_sections['subnet_loop']['iteration'] <= $this->_sections['subnet_loop']['total'];
                 $this->_sections['subnet_loop']['index'] += $this->_sections['subnet_loop']['step'], $this->_sections['subnet_loop']['iteration']++):
$this->_sections['subnet_loop']['rownum'] = $this->_sections['subnet_loop']['iteration'];
$this->_sections['subnet_loop']['index_prev'] = $this->_sections['subnet_loop']['index'] - $this->_sections['subnet_loop']['step'];
$this->_sections['subnet_loop']['index_next'] = $this->_sections['subnet_loop']['index'] + $this->_sections['subnet_loop']['step'];
$this->_sections['subnet_loop']['first']      = ($this->_sections['subnet_loop']['iteration'] == 1);
$this->_sections['subnet_loop']['last']       = ($this->_sections['subnet_loop']['iteration'] == $this->_sections['subnet_loop']['total']);
?>
						<option value='<?php echo $this->_tpl_vars['subnets'][$this->_sections['subnet_loop']['index']]['subnet_id']; ?>
' selected='selected'><?php echo SELanguage::_get($this->_tpl_vars['subnets'][$this->_sections['subnet_loop']['index']]['subnet_name']); ?></option>
						<?php endfor; endif; ?>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2"><br /><b><?php echo SELanguage::_get(690690020); ?></b></td>
				</tr>
				<tr>
					<td colspan="2">
						<select size='<?php if (count($this->_tpl_vars['cats']) > 10): ?>10<?php else: 
 echo count($this->_tpl_vars['cats']); 
 endif; ?>' class='text' name='cats[]' id='cats' multiple='multiple' style='width: 270px;'>
						<?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
							<option value='<?php echo $this->_tpl_vars['cat']['profilecat_id']; ?>
' selected='selected'><?php echo SELanguage::_get($this->_tpl_vars['cat']['profilecat_title']); ?></option>
						<?php endforeach; endif; unset($_from); ?>
						</select>
						
					</td>
				</tr>
			</table>
		</div>
		<br />
		<div class="he_submit">
			<input type='submit' class='button' value='<?php echo SELanguage::_get(690690017); ?>' />
		</div>
	</form>
	<br /><br /><br /><br />
	
	
	<h3><b><?php echo SELanguage::_get(690690025); ?></b></h3>
	<table class="he_tbl" width="100%">
		<thead>
			<td><?php echo SELanguage::_get(690690012); ?></td>
			<td><?php echo SELanguage::_get(690690026); ?></td>
			<td><?php echo SELanguage::_get(690690027); ?></td>
			<td><?php echo SELanguage::_get(690690028); ?></td>
		</thead>
		<tbody>
		<?php $_from = $this->_tpl_vars['campaigns']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['campaign']):
?>
			<tr class="bg1">
				<td width="530" valign="top">
					<a href="javascript://" onclick="if( $('message_<?php echo $this->_tpl_vars['campaign']['id']; ?>
').style.display=='none' ) $('message_<?php echo $this->_tpl_vars['campaign']['id']; ?>
').style.display=''; else $('message_<?php echo $this->_tpl_vars['campaign']['id']; ?>
').style.display='none';"><?php echo $this->_tpl_vars['campaign']['subject']; ?>
</a>
					<div class="bg1" id="message_<?php echo $this->_tpl_vars['campaign']['id']; ?>
" style="display:none;"><br /><?php echo ((is_array($_tmp=$this->_tpl_vars['campaign']['message'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
<br /><br /></div>
				</td>
				<td width="120" valign="top" align="center"><a href="../profile.php?user=<?php echo $this->_tpl_vars['campaign']['sender']; ?>
"><?php echo $this->_tpl_vars['campaign']['sender']; ?>
</a></td>
				<td width="35" valign="top" align="center"><?php echo $this->_tpl_vars['campaign']['recipient_count']; ?>
</td>
				<td width="90" valign="top"><?php echo $this->_tpl_vars['datetime']->cdate("F m, Y, g:i a",$this->_tpl_vars['datetime']->timezone($this->_tpl_vars['campaign']['sent_time'],$this->_tpl_vars['setting']['setting_timezone'])); ?>
</td>
			</tr>
		<?php endforeach; endif; unset($_from); ?>
		</tbody>
	</table>
	<br />

<?php elseif ($this->_tpl_vars['tab'] == 'mass_email'): ?>

	<br /><br />
	<div class="he_box" style="width:350px;"><?php echo SELanguage::_get(690690024); ?></div>
	<br /><br />

<?php endif; ?>

</div>

<br />
</div>